"use strict";

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = (app) => {
    const { router, controller } = app;
    router.get("/", controller.home.index);
    // 注册
    router.post("/register", controller.home.register);
    // 登录
    router.post("/login", controller.home.login);
    // 修改密码
    router.put("/users/password", controller.user.changePassword);
    // 注销用户
    router.delete("/users", controller.user.remove);
    // 修改用户信息
    router.put("/users", controller.user.update);
};
